package com.imb.common.web.aop;

import com.imb.common.core.enums.ThreadKeyEnum;
import com.imb.common.web.thread.ThreadFactorys;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.concurrent.ExecutorService;

/**
 * @author xiaozhi 2023/7/12
 */
@Slf4j
@Component
public class LogFilterExecutoServer {

    @Resource
    private ThreadFactorys threadFactorys;

    @PostConstruct
    public ExecutorService init(){
        ExecutorService executorService= threadFactorys.getCreateManagedExecutors(ThreadKeyEnum.LOG.getKey());
        if(executorService!=null){
            return executorService;
        }
        return null;
    }
}
